#include <iostream>
#include <cmath>
#include <allegro.h>
#include <cstdlib>
using namespace std;

int main()
{
    float n,m,x0[10],wave,l=50;
    int i;
    cout<<"\tHow many phase trajectories:";
    cout<<"\t";
    cin>>n;
    cout<<"\tEnter "<<n<<" unequal initial position :\t";
    for(i=0;i<n;i++)
    {
        cout<<"\t";
        cin>>x0[i];
    }
    cout<<"\tEnter the mass of the string:\t";
    cin>>m;
    
    allegro_init();
    install_keyboard();
    set_gfx_mode(GFX_AUTODETECT_WINDOWED,640,480,0,0);
    clear_to_color(screen,makecol(255,255,255));
    int xprev=50,yprev=300;
    for(i=0;i<=1;i++)
    {
        wave=sqrt(2.0/l)*sin(n*3.14*i/l);
        wave=-wave;
        line(screen,xprev,yprev,50+20*i,300+500*wave,makecol(0,0,0));
        xprev=50+20*i;
        yprev=300+500*wave;
    }
    readkey();
}
END_OF_MAIN()
